	$(function() {
		 	$("#address").treemenu({ jsondata: treedata, deep: 2 });
			$("#beginTime").jqxDateTimeInput({ width: "150px", height: "30px", formatString: "yyyy-MM-dd", value: getFirstDayOfLastmonth() });
			$("#endTime").jqxDateTimeInput({ width: "150px", height: "30px", formatString: "yyyy-MM-dd", value: getLastDayOfLastmonth() });
			var tableSource = new $.jqx.dataAdapter({
				dataType: "json",
				dataFields:[
				    { name: "name", type: "string" },
				    { name: "province", type: "string" },
				    { name: "city", type: "string" },
				    { name: "district", type: "string" },
			  	    { name: "address", type: "int" },
				    { name: "total", type: "number" }
				],
				id: "id",
				url: "statistics/seller.do",
				data: { beginTime: format(getFirstDayOfLastmonth(), "Y-M-D"), endTime: format(getLastDayOfLastmonth(), "Y-M-D") }
			});
			$("#dataTable").jqxDataTable({
				width: "100%",
		        source: tableSource,
                pageable: true,
                pageSize: 18,
                serverProcessing: true,
                pagerButtonsCount: 10,
		        columnsResize: true,
		        sortable: true,
		        columns: [
		            { text: "序号", width: 50, cellsRenderer: function(row){ return (row + 1).toString(); } },
		            { text: "商家名称  ", dataField: "name", minWidth: 120 },
		            { text: "所在地区  ", dataField: "address", minWidth: 120, cellsRenderer:function(row, column, value, rowData){return rowData.province + "." + rowData.city + "." + rowData.district} },
		            { text: "营业额(￥)", dataField: "total", minWidth: 120 }
		        ]
			});
		});